package com.hws.controller;

import com.hws.pojo.User;
import com.hws.service.UserService;
import com.hws.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/getusers")
    public List<User> getUsers() {
        List<User> users = userService.getUsers();
        return users;
    }

}
